﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="huishouzhan.aspx.cs" Inherits="FPC.Offer.UI.SkyDrive.huishouzhan" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <meta charset="utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="../H-ui/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" />
    <link href="../H-ui/Lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/skin/default/skin.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/style.css" rel="stylesheet" />
    <title>栏目管理</title>
</head>
<body>

    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>
        网盘
        <span class="c-gray en">&gt;</span>
        回收站
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="page-container">
     
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 清空回收站</a>
               
            </span>
            <span class="r">共有数据：<strong>54</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                    <tr class="text-c">
                      <th width="25"><input type="checkbox" name="" value=""></th>
                        <th >文件名称</th>
                    
                        <th>删除时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                 <tbody id="tr">

                </tbody>
                <tbody id="tc">

                </tbody>
            </table>
        </div>
    </div>
<!--_footer 作为公共模版分离出去-->
    
    <script type="text/javascript" src="../H-ui/Lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../H-ui/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../H-ui/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="../H-ui/static/h-ui.admin/js/H-ui.admin.js"></script>
    <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="../H-ui/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="../H-ui/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="../H-ui//jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript">
        $(function () {

            //显示文件
            $.ajax({

                type: "post",
                url: "../GeneralProcessor/SkyDriveHand/RecoveryTableHandler.ashx",
                data: {

                    name: "aa2",
                },
                success: function (mes) {

                    var item = JSON.parse(mes);

                    var tr = "";
                    $(item).each(function (i, item) {


                        tr += " <tr class='text-c'> <td><input type='checkbox' name='che' value='" + item.NeiTrayId + "'></td><td class='text-l'><img src='image/1.png' /><a href='Subfolder.aspx?name=" + item.FileName + "'>" + item.FileName + "<a></td><td>" + item.FileDate + "</td><td class='f-14'><a title='恢复' href='javascript:;' onclick='del(" + item.NeiTrayId + ")' class='ml-5' style='text-decoration:none'><i class='Hui-iconfont'>&#xe6e8;</i></a><a title='删除' href='javascript:;' onclick='deletec(" + item.NeiTrayId + ")' class='ml-5' style='text-decoration:none'><i class='Hui-iconfont'>&#xe6e2;</i></a></td></tr>"


                    })
                    $("#tr").append(tr);
                }
            })
            //显示文件的文档

            $.ajax({


                type: "post",
                url: "../GeneralProcessor/SkyDriveHand/HuiSubshowHandler.ashx",
                success: function (mes) {

                    var item = JSON.parse(mes);

                    var tc = "";
                    $(item).each(function (i, item) {


                        tc += " <tr class='text-c'><td></td><td class='text-l'>" + item.SName + "</td><td>" + item.FileDate + "</td><td class='f-14'><a title='恢复' href='javascript:;' onclick='delfun(" + item.SId + ")' class='ml-5' style='text-decoration:none'><i class='Hui-iconfont'>&#xe6e8;</i></a><a title='删除' href='javascript:;' onclick='dfun(" + item.SId + ")' class='ml-5' style='text-decoration:none'><i class='Hui-iconfont'>&#xe6e2;</i></a></td> </tr>"


                    })
                    $("#tc").append(tc);
                }
            })
        })
        //修改子文档的状态

        function delfun(b) {
            $.ajax({
                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DelSubHandler.ashx",
                data: {
                    id: b,

                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }


                }

            })



        }
        //删除子文档及数据库
        function dfun(b) {
            $.ajax({
                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DelZSubHandler.ashx",
                data: {
                    id: b,

                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }


                }

            })



        }







        //删除文件夹和数据库数据
        function deletec(a) {

            $.ajax({
                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DeleteHandler.ashx",
                data: {
                    id: a,

                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }


                }

            })



        }
        //修改状态
        function del(a) {

            $.ajax({
                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DelTableHandler.ashx",
                data: {
                    id: a,

                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }


                }

            })



        }
        //全选删除文件夹和数据库数据
        function datadel() {
            var id = new Array();
            $("input[name=che]:checked").each(function () {

                id.push($(this).val());

            })
            $.ajax({

                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DeleteHandler.ashx",
                data: {
                    ids: id.toString(),
                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }
                }


            })






        }




    </script>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
